<template>
	<view>
		<sh-invite-poster v-if="posterType === 'user'"></sh-invite-poster>
		<sh-goods-poster v-if="posterType === 'goods'"></sh-goods-poster>
	</view>
</template>

<script>
import shInvitePoster from './children/sh-invite-poster.vue';
import shGoodsPoster from './children/sh-goods-poster.vue';
export default {
	components: {
		shInvitePoster,shGoodsPoster
	},
	data() {
		return {
			posterType: '',
		};
	},
	computed: {},
	onLoad(options) {
		this.posterType = options.posterType;
		switch (this.posterType) {
			case 'user':
				uni.setNavigationBarTitle({
					title: '邀请好友'
				});
				break;
			case 'goods':
				uni.setNavigationBarTitle({
					title: '商品海报'
				});
				break;
			case 'groupon':
				uni.setNavigationBarTitle({
					title: '拼团海报'
				});
				break;
			default:
				uni.setNavigationBarTitle({
					title: '海报'
				});
		}
	},
	methods: {
	}
};
</script>

<style lang="scss"></style>
